package com.ship.dispatch.service;

import com.ship.common.core.web.domain.JsonResult;
import com.ship.common.business.service.BaseService;
import com.ship.dispatch.bean.SpArrangeScheme;
import com.ship.dispatch.bean.SpArrangeSchemeDetail;
import com.ship.dispatch.model.Vo.SpArrangeStatisticsVo;
import com.ship.dispatch.model.dto.ArrangeSchemeChartSimpleDto;
import com.ship.dispatch.model.dto.SchemeChartSimpleDto;
import com.ship.dispatch.model.dto.SpArrangeSchemeDetailStatusDto;

import java.util.Map;

/**
* @author zhangyh
* @description 针对表【sp_arrange(货船排布)】的数据库操作Service
* @createDate 2023-11-03 10:17:22
*/
public interface SpArrangeSchemeService extends BaseService<SpArrangeScheme> {

    /**
     * 执行状态信息同步
     * @param arrangeSchemeDetailId 船货排布方案明细ID
     * @param executeStatus 执行状态（3：已完成，4：已终止）
     * @return
     */
    void getArrangeSchemeChart(Long arrangeSchemeDetailId,int executeStatus);

    /**
     * 获取甘特图
     * @param dto
     * @return
     */
    JsonResult getArrangeSchemeChart(SchemeChartSimpleDto dto);

    /**
     * 获取方案详情分页
     * @param dto
     * @return
     */
    JsonResult getSchemeDetailPage(SpArrangeSchemeDetail dto);

    /**
     * 顶部统计信息
     * @return
     */
    JsonResult<SpArrangeStatisticsVo> topStatistics();

    /**
     * 状态变更
     * @return
     */
    JsonResult statusUpdate(SpArrangeSchemeDetailStatusDto dto);

    /**
     * 船货方案执行审批回执
     * @param param
     * @param schemeId
     * @return
     */
    JsonResult arrangeSchemeApproveBack(Map<String,Object> param, Long schemeId, Integer approveStatus);

    /**
     * 详情
     * @param detailId
     * @return
     */
    JsonResult getDetail(Long detailId);

    /**
     * 获取可用船只甘特图
     * @param dto
     * @return
     */
    JsonResult<SpArrangeSchemeDetail> getAvailableArrangeSchemeChart(ArrangeSchemeChartSimpleDto dto);

    void resetVoyageNoAndGoodsNumberByYear(int year);
}
